<?php

namespace app\api\validate;

use think\Validate;

class Upload extends Validate
{

    /**
     * 验证规则
     */
    protected $rule = [
        'media_id' => 'require',
        'title' => 'require',
        'identifier' => 'require',
        'filename' => 'require',
        'totalSize' => 'require',
        'chunkNumber' => 'require',
        'totalChunks' => 'require',
    ];

    /**
     * 场景
     */
    protected $scene = [
        'upload' => ['media_id', 'identifier', 'filename', 'totalSize', 'chunkNumber', 'totalChunks'],
        'merge'  => ['media_id']
    ];
}
